<include file="Public:js" /> 
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"> </script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script src="__PUBLIC__/MyDatePicker/WdatePicker.js"></script>
<style type="text/css">

</style>
<div class="main-wrap">
    <div class="crumb-wrap">
        <div class="crumb-list"><i class="icon-font"></i><a href="#">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">具体信息</span></div>
    </div>
  <div class="content">
    <form method="post" action="{:U('addFujiaInfoSub')}" enctype="multipart/form-data">
    <table class="result-tab" width="100%">
        <foreach name="fields" item="v" key="k">
        <tr>
            <td style="padding-left: 25px;">{$v.name}</td>
            <td>
                <if condition="$v['form_type']=='fujian'">
                <input type="file" name="{$v.field}"/>

                <elseif condition="$v['form_type']=='textarea'"/>
                <textarea rows="10" cols="110" name="{$v.field}">{$info[$v['field']]}</textarea>

                <elseif condition="$v['form_type']=='editor'"/>
                <script id="editor{$v.id}" name="{$v.field}" type="text/plain" style="width:800px;height:500px;">{:htmlspecialchars_decode($info[$v['field']])}</script>

                <script type="text/javascript">
                    //实例化编辑器
                    var id={$v.id};
                    var ue = UE.getEditor('editor'+id);
                </script>

                <elseif condition="$v['form_type']=='text'"/>
                <input type="text" name="{$v.field}" style="width: 400px;" value="{$info[$v['field']]}" />

                <elseif condition="$v['form_type']=='pic'"/>
                <input type="file" name="{$v.field}" style="width: 400px;" />
                
                <elseif condition="$v['form_type']=='radio'" />
                    <foreach name="v['value']" item="vv">                   
                     <input type="radio" name="{$v.field}" value="{$vv}" <if condition="$info[$v['field']] eq $vv">checked</if> />{$vv}&ensp;
                    </foreach>
                <elseif condition="$v['form_type']=='datetime'"/>               
                <input type="text" name="{$v.field}" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width: 240px;" value="{$info[$v['field']]}"/>
                 

                <elseif condition="$v['form_type']=='checkbox'"/>
                <foreach name="v['value']" item="vv">                
                <input type="checkbox" name="{$v['field']}[]" value="{$vv}" <if condition="in_array($vv,$info[$v['field']])">checked</if> />{$vv}&ensp;
                </foreach>
                <input type="hidden" name="checkbox_name" value="{$v['field']}"/>
                </if>
            </td>
        </tr>

        </foreach>
        <!-- $info[$v['field']] eq $vv -->
        <input type="hidden" name="goods_id" value="{$goods_id}" />
        <input type="hidden" name="cat_id" value="{$cat_id}" />
        <input type="hidden" name="act" value="{$act}" />
        <tr>
            <td></td><td><input type="submit" value="提交" /></td>
        </tr>
    </table>
    </form>

  </div>      

</div>
<script type="text/javascript">
    //实例化编辑器
    var ue = UE.getEditor('editor');
</script>